home *** CD-ROM | disk | FTP | other *** search
/ PC Player 2004 May / pc player 2004-05.iso / Demos / FarCry / Data1.cab / _817586576EBC4FC1805D86B8D1817B3E < prev    next >
Encoding:
Text File  |  2004-01-06  |  835 b   |  32 lines

  1. Script:LoadScript("scripts/default/entities/pickups/basepickup.lua");
  2.  
  3. local funcPick=function (self,collider)
  4.     printf("CHECKPOINT REACHED: "..self.Properties.nId);
  5.     self:EnableSave(nil);
  6.  
  7.     _LastCheckPPos = new (self:GetPos());
  8.     _LastCheckPAngles = new(self:GetAngles());
  9.     Game:TouchCheckPoint(self.Properties.nId, _LastCheckPPos, _LastCheckPAngles);
  10.  
  11.     return 1;
  12. end
  13.  
  14. local params={
  15.     func=funcPick,
  16.     model="objects/pickups/misc/checkpoint.cgf",
  17.     default_amount=0,
  18.     sound="sounds/waypoint/waypoint1.wav",
  19.     modelchoosable=nil,
  20.     soundchoosable=nil
  21. }
  22.  
  23. Checkpoint=CreateCustomPickup(params);
  24. Checkpoint.Properties.Amount=nil;
  25. Checkpoint.Properties.RespawnTime=0;
  26. Checkpoint.Properties.nId=0;
  27.  
  28. -- still respawn
  29. -- current checkpoint is saved in the old state
  30. -- renders own player
  31. -- ammo count and other vars
  32.